cmake_minimum_required(VERSION 3.6)
project(CP-LLVM-passes)

# LLVM uses C++17.
set(CMAKE_CXX_STANDARD 17)

set(LLVM_DIR /home/iris/projects/llvm-project-14/build/lib/cmake/llvm)

# Load LLVMConfig.cmake. If this fails, consider setting `LLVM_DIR` to point
# to your LLVM installation's `lib/cmake/llvm` directory.
find_package(LLVM REQUIRED CONFIG)

# Include the part of LLVM's CMake libraries that defines
# `add_llvm_pass_plugin`.
include(AddLLVM)

# Use LLVM's preprocessor definitions, include directories, and library search
# paths.
add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})

# Our pass lives in this subdirectory.
add_subdirectory(CountOp)
add_subdirectory(CFGEdgeNum)
add_subdirectory(ShowBranchTF)